Diaphragm pumps typically include a shaft, or diaphragm rod, that moves reciprocally between end of stroke positions to cause one or more diaphragms coupled to the shaft to modify the volume of one or more associated pump chambers. A sensor may be used to detect the position and/or the movement of the shaft, such as when the shaft reaches one of the end of stroke positions. Information regarding the position and/or the movement of the shaft, obtained from the sensor, may then be utilized in controlling operation of the diaphragm pump. One such design, employing a proximity sensor, is described in U.S. Patent Application Publication No. 2010/0196168 to Kozumplik et al., the entire disclosure of which is incorporated by reference herein. Prior designs, such as that disclosed in the foregoing reference, often require a tedious assembly and adjustment procedure to achieve precise positioning of the sensor relative to the shaft.